﻿namespace RapidDownloader.Model
{
    public sealed class FileWriteProgressMessage<TFile>
    {
        #region Constructors

        public FileWriteProgressMessage(TFile file, long bytesWritten, long totalSize)
        {
            File = file;
            BytesWritten = bytesWritten;
            TotalSize = totalSize;
            IsCompleted = bytesWritten == totalSize;
        }

        #endregion

        #region Properties

        public TFile File { get; private set; }
        public long BytesWritten { get; private set; }
        public long TotalSize { get; private set; }
        public bool IsCompleted { get; set; }

        #endregion
    }
}